package com.study.workflow;

import org.flowable.engine.ProcessEngine;
import org.flowable.engine.ProcessEngineConfiguration;
import org.flowable.engine.impl.cfg.StandaloneProcessEngineConfiguration;

/**
 * @author sjw
 * @description
 * @date 2019-08-31 上午10:49
 */
public class ProcessEngineFactory {
    public static ProcessEngine processEngine(){
        ProcessEngineConfiguration conf = new StandaloneProcessEngineConfiguration()
                .setJdbcUrl("jdbc:mysql://123.57.233.10:3306/work_flow?useUnicode=true&characterEncoding=UTF-8")
                .setJdbcDriver("com.mysql.jdbc.Driver")
                .setJdbcUsername("root")
                .setJdbcPassword("sjw@1020")
                .setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE);
        return conf.buildProcessEngine();
    }
}
